//
//  OTNavBar.h
//  OT_OC
//
//  Created by yunmian on 2019/7/16.
//  Copyright © 2019 James. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@protocol OTNavBarDelegate <NSObject>

- (void)navBarDidSelectedRight;

@end

typedef NS_ENUM(NSUInteger, OTNavBarType) {
    OTNavBarTypeDefault,
    OTNavBarTypeHome,
    OTNavBarTypeAdd,
};

@interface OTNavBar : UIView
{
    UIView              *backgroundView;
    UIView              *containerView;
    UILabel             *titleLabel;
    UIButton            *backButton;
    UIButton            *rightButton;
}

@property (nonatomic, copy) NSString *title;
@property (nonatomic, copy) NSString *rightTitle;
@property (nonatomic, assign) OTNavBarType type;
@property (nonatomic, weak) id<OTNavBarDelegate> delegate;

+ (instancetype)createNavBar;

@end

NS_ASSUME_NONNULL_END
